<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%
 	String mem_id = (String)session.getAttribute("id");
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Main</title>
<style type="text/css">
#mem_id,#mem_pw{float:left;  font-weight:bold; width:100px; height:23px; text-decoration:none; font-family:돋움, 돋움체; font-size:14px; color:#9c9;}
</style>
<script language="javascript">
	function form_check(){
		var theForm=document.login_form;
		
		if(theForm.mem_id.value==""){
			alert('아이디를 입력하세요');
		}
		else if(theForm.mem_pw.value==""){
			alert("비밀번호를 입력하세요");	
		}
	}	
</script>


</head>

<body>
<%
	if(mem_id != null){
%>
<b><%=mem_id%></b>님 환영합니다.<p>
<a href="Main_logout.jsp">로그아웃</a>
<%}else{ %>

<form name="login_form" method="post" action="Main_login_check.jsp">
<b>Login</b><br><br>
ID :&nbsp;&nbsp;&nbsp;<input type=text name="mem_id">
<br>
<p>PW : <input type=password name="mem_pw">&nbsp;
<input type=submit name="로그인" value="로그인" onClick="form_check()"></p>

&nbsp; &nbsp; &nbsp; <a href="Main_join.jsp">회원가입</a> 
&nbsp; &nbsp; &nbsp; &nbsp; <a href = "Main_findpw.jsp">비밀번호 찾기</a>
</form>
<%} %>

</body>

</html>